Add integrator-dist Dockerfiles for alpine, ubuntu, and rocky#411
Add integrator-dist Dockerfiles for alpine, ubuntu, and rocky#411chiranSachintha wants to merge 7 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThree new Dockerfile+README sets are added (Alpine, Rocky, Ubuntu) to build WSO2 Integrator images. Each Dockerfile installs OS packages and locales, downloads and verifies an architecture-specific Temurin JDK, creates a configurable non-root user, downloads and unpacks an Integrator distribution ZIP into the user home, configures BALLERINA_HOME and PATH, switches to the non-root user, sets WORKDIR, and defaults to running Sequence Diagram(s)sequenceDiagram
participant DockerBuild
participant PackageManager
participant TemurinHost
participant FileSystem
participant ContainerRuntime
DockerBuild->>PackageManager: update OS & install packages (dnf/apt/apk)
DockerBuild->>TemurinHost: download arch-specific Temurin JDK tarball (URL)
TemurinHost-->>DockerBuild: tarball
DockerBuild->>DockerBuild: verify SHA-256 checksum
DockerBuild->>FileSystem: extract JDK to /opt/java/openjdk (set JAVA_HOME, PATH)
DockerBuild->>FileSystem: create non-root user/group
DockerBuild->>TemurinHost: download Integrator distribution ZIP (WSO2_SERVER_DIST_URL)
TemurinHost-->>DockerBuild: integrator ZIP
DockerBuild->>FileSystem: unzip integrator into user home, remove ZIP, chown
DockerBuild->>ContainerRuntime: set BALLERINA_HOME, update PATH, switch user, WORKDIR, CMD bal version
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
dockerfiles/rocky/integrator-dist/Dockerfile (1)
14-31: Missing s390x architecture support compared to Ubuntu Dockerfile.Ubuntu Dockerfile supports
s390x|s390:64-bitarchitecture but Rocky does not. If s390x support is needed for Rocky, add the corresponding case. If intentionally omitted (e.g., Rocky doesn't support s390x), consider adding a comment explaining the difference.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dockerfiles/rocky/integrator-dist/Dockerfile` around lines 14 - 31, The Rocky Dockerfile's architecture case for ${ARCH} is missing the s390x entry present in the Ubuntu Dockerfile; add a case branch for s390x (e.g., pattern like s390x|s390:64-bit) that sets ESUM and BINARY_URL to the same values used in the Ubuntu Dockerfile's s390x case (so the OpenJDK tarball and checksum match), or if s390x support is intentionally not provided for Rocky, add a clear comment above the case block explaining why s390x was omitted; update the case handling around the existing ESUM and BINARY_URL assignments accordingly.dockerfiles/rocky/integrator-dist/README.md (1)
1-1: Consider expanding documentation.The single-line README is acceptable for an initial addition, but consider adding build instructions, required build arguments (e.g.,
WSO2_SERVER_DIST_URL), and usage examples in a follow-up.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dockerfiles/rocky/integrator-dist/README.md` at line 1, The README currently contains only a title; expand it to include concise build and usage documentation: add a "Build" section detailing required build arguments (at minimum document WSO2_SERVER_DIST_URL and any other Docker build-arg names used in the Dockerfile), example docker build command with the build-args, a "Run/Usage" section showing example docker run commands and exposed ports, and a "Notes" or "Troubleshooting" section for common pitfalls; reference the README's title line so the maintainer knows to update that file and ensure the documented build-arg names exactly match the ARG names used in the Dockerfile(s).dockerfiles/alpine/integrator-dist/Dockerfile (1)
53-53: Placeholder URL will cause build failure if not overridden.The default value
<INTEGRATOR_DIST_URL>will causewgetto fail with a confusing error if the build argument isn't provided. Consider adding validation or documenting the required build argument prominently.💡 Optional: Add validation before download
+RUN if [ "${WSO2_SERVER_DIST_URL}" = "<INTEGRATOR_DIST_URL>" ]; then \ + echo "Error: WSO2_SERVER_DIST_URL build argument must be provided"; \ + exit 1; \ + fi + RUN wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dockerfiles/alpine/integrator-dist/Dockerfile` at line 53, The Dockerfile currently sets ARG WSO2_SERVER_DIST_URL=<INTEGRATOR_DIST_URL>, which will cause wget to fail if the build arg is not provided; update the Dockerfile to avoid a confusing failure by removing the placeholder default or setting it empty and add an early validation step that checks WSO2_SERVER_DIST_URL before attempting the download (e.g., a RUN that tests if the variable is non-empty and prints a clear error and exits if not), and ensure the wget/download step references the same ARG/ENV (WSO2_SERVER_DIST_URL) so the build fails fast with a clear message when the build-arg is missing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Line 1: The Dockerfile's base image tag "FROM rockylinux:9.5" is invalid and
causes builds to fail; update that FROM line to use a valid tag such as
"rockylinux:9.3" or the generic "rockylinux:9" so the image exists on Docker
Hub, i.e., replace the "FROM rockylinux:9.5" entry in the Dockerfile with one of
those valid tags.
- Around line 12-13: The Dockerfile's ARCH detection relies on objdump (see
ARCH="$(objdump="$(command -v objdump)" ...")") but binutils may not be
installed, causing a "command not found" failure; update the Dockerfile to
either install binutils (so objdump exists) in the package install step or
replace the objdump-based detection with a portable command like uname -m to set
ARCH, and ensure the change references the ARCH variable and the objdump
invocation so you modify the correct logic.
---
Nitpick comments:
In `@dockerfiles/alpine/integrator-dist/Dockerfile`:
- Line 53: The Dockerfile currently sets ARG
WSO2_SERVER_DIST_URL=<INTEGRATOR_DIST_URL>, which will cause wget to fail if the
build arg is not provided; update the Dockerfile to avoid a confusing failure by
removing the placeholder default or setting it empty and add an early validation
step that checks WSO2_SERVER_DIST_URL before attempting the download (e.g., a
RUN that tests if the variable is non-empty and prints a clear error and exits
if not), and ensure the wget/download step references the same ARG/ENV
(WSO2_SERVER_DIST_URL) so the build fails fast with a clear message when the
build-arg is missing.
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 14-31: The Rocky Dockerfile's architecture case for ${ARCH} is
missing the s390x entry present in the Ubuntu Dockerfile; add a case branch for
s390x (e.g., pattern like s390x|s390:64-bit) that sets ESUM and BINARY_URL to
the same values used in the Ubuntu Dockerfile's s390x case (so the OpenJDK
tarball and checksum match), or if s390x support is intentionally not provided
for Rocky, add a clear comment above the case block explaining why s390x was
omitted; update the case handling around the existing ESUM and BINARY_URL
assignments accordingly.
In `@dockerfiles/rocky/integrator-dist/README.md`:
- Line 1: The README currently contains only a title; expand it to include
concise build and usage documentation: add a "Build" section detailing required
build arguments (at minimum document WSO2_SERVER_DIST_URL and any other Docker
build-arg names used in the Dockerfile), example docker build command with the
build-args, a "Run/Usage" section showing example docker run commands and
exposed ports, and a "Notes" or "Troubleshooting" section for common pitfalls;
reference the README's title line so the maintainer knows to update that file
and ensure the documented build-arg names exactly match the ARG names used in
the Dockerfile(s).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 49a37aac-701b-441a-b8e2-5416db237ceb
📒 Files selected for processing (6)
dockerfiles/alpine/integrator-dist/Dockerfiledockerfiles/alpine/integrator-dist/README.mddockerfiles/rocky/integrator-dist/Dockerfiledockerfiles/rocky/integrator-dist/README.mddockerfiles/ubuntu/integrator-dist/Dockerfiledockerfiles/ubuntu/integrator-dist/README.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 3-7: The Dockerfile currently only sets ENV vars and installs
glibc-langpack-en; update the locale setup to mirror the micro-integrator
pattern by installing glibc-locale-source, invoking localedef for en_US.UTF-8,
and writing locale configuration files (/etc/locale.conf and
/etc/environment)—modify the RUN block that installs packages (the dnf install
line) to include glibc-locale-source, add a localedef step for en_US.UTF-8, and
create the two files with the correct LANG/LC_ALL settings so the ENV entries
and installed locale are consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b9ce4a02-5db7-40fe-9349-eb8680b0f3ce
📒 Files selected for processing (1)
dockerfiles/rocky/integrator-dist/Dockerfile
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 5-8: The RUN step installing glibc-locale-source/glibc-langpack-en
should remove DNF caches to avoid bloating the image: after the dnf install &&
locale setup commands in the same RUN (the block that calls dnf install and
localedef and writes /etc/locale.conf and /etc/environment) append a DNF cleanup
command (e.g., dnf clean all && rm -rf /var/cache/dnf) so package metadata and
caches are deleted in the same layer.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 425c722f-f4b2-46fa-ae4e-32315960a00a
📒 Files selected for processing (1)
dockerfiles/rocky/integrator-dist/Dockerfile
There was a problem hiding this comment.
🧹 Nitpick comments (1)
dockerfiles/rocky/integrator-dist/Dockerfile (1)
70-70: ⚡ Quick winHardcoded Ballerina version may break if distribution changes.
The path
ballerina-2201.13.2is hardcoded inBALLERINA_HOME. If the Integrator distribution is updated with a different Ballerina version, the container will fail at runtime. Consider making this an ARG so it can be updated alongsideWSO2_SERVER_VERSION.♻️ Proposed fix
+ARG BALLERINA_VERSION=2201.13.2 ARG WSO2_SERVER_DIST_URL=<INTEGRATOR_DIST_URL> RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} RUN wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ && rm -f ${WSO2_SERVER}.zip \ && chown -R ${USER}:${USER_GROUP} ${USER_HOME} -ENV BALLERINA_HOME=${WSO2_SERVER_HOME}/ballerina-2201.13.2 +ENV BALLERINA_HOME=${WSO2_SERVER_HOME}/ballerina-${BALLERINA_VERSION} ENV PATH="${BALLERINA_HOME}/bin:${PATH}"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@dockerfiles/rocky/integrator-dist/Dockerfile` at line 70, The Dockerfile hardcodes BALLERINA_HOME to ballerina-2201.13.2; introduce a build ARG (e.g., BALLERINA_VERSION) with a sensible default and use it to set ENV BALLERINA_HOME so the value becomes ${WSO2_SERVER_HOME}/ballerina-${BALLERINA_VERSION}; update any references or documentation that assume the hardcoded name and ensure the ARG is declared near WSO2_SERVER_VERSION so the Ballerina version can be overridden at build time.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Line 70: The Dockerfile hardcodes BALLERINA_HOME to ballerina-2201.13.2;
introduce a build ARG (e.g., BALLERINA_VERSION) with a sensible default and use
it to set ENV BALLERINA_HOME so the value becomes
${WSO2_SERVER_HOME}/ballerina-${BALLERINA_VERSION}; update any references or
documentation that assume the hardcoded name and ensure the ARG is declared near
WSO2_SERVER_VERSION so the Ballerina version can be overridden at build time.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9fc7d4ea-f949-41c6-a59f-bee8739e8597
📒 Files selected for processing (1)
dockerfiles/rocky/integrator-dist/Dockerfile
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dockerfiles/alpine/integrator-dist/Dockerfile`:
- Around line 9-11: The comment about the JDK version is inconsistent with the
environment variable; update the plaintext comment that currently says “OpenJDK
21” to reference OpenJDK 25 so it matches ENV JAVA_VERSION jdk-25.0.2+10 (look
for the ENV JAVA_VERSION line and the adjacent install comment in the Dockerfile
and change the comment text only).
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 16-18: The comment on the Dockerfile is out of sync with the
declared JAVA_VERSION: update the comment that currently reads "install Temurin
OpenJDK 21" to reference JDK 25 (e.g., "install Temurin OpenJDK 25") so it
matches the ENV JAVA_VERSION jdk-25.0.2+10; ensure any adjacent comments
mentioning OpenJDK version are also aligned.
In `@dockerfiles/ubuntu/integrator-dist/Dockerfile`:
- Around line 11-13: The comment "install Temurin OpenJDK 21" is out of sync
with the ENV setting; update the comment to match the ENV JAVA_VERSION value
(ENV JAVA_VERSION jdk-25.0.2+10) so the Dockerfile accurately documents which
JDK is being installed; locate the comment near the ENV JAVA_VERSION declaration
and change the "OpenJDK 21" text to reference jdk-25.0.2+10 (or a matching
human-readable version) to keep them consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: da70c204-844a-4f7c-8026-44eaf29ebca8
📒 Files selected for processing (3)
dockerfiles/alpine/integrator-dist/Dockerfiledockerfiles/rocky/integrator-dist/Dockerfiledockerfiles/ubuntu/integrator-dist/Dockerfile
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning